/**
 * 
 */
package org.xlab.baseframework.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.xlab.baseframework.domain.enumerate.EnumWebServiceClientType;
import org.xlab.baseframework.system.Declare;

/**
 * @author makubex
 * 
 */
@Entity
@Table(name = "T_SYS_WSSESSION")
public class SystemWebServiceSession extends
		AbstractLogicalVersionControlDomainObject {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = -2488715457675392990L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = Declare.DEFAULT_SYSTEM_DB_SEQUENCE)
	@SequenceGenerator(name = Declare.DEFAULT_SYSTEM_DB_SEQUENCE, sequenceName = Declare.DEFAULT_SYSTEM_DB_SEQUENCE, allocationSize = 1, initialValue = 0)
	@Column(name = "ID_")
	private Long id;
	@Column(name = "SESSION_ID", length = 64, unique = true, nullable = false)
	private String sessionId;
	@Column(name = "CLIENT_ID", length = 32, nullable = true)
	private String clientId;
	@Enumerated(value = EnumType.ORDINAL)
	@Column(name = "CLIENT_TYPE", nullable = false, length = 1)
	private EnumWebServiceClientType clientType;

	/**
	 * @return the clientId
	 */
	public String getClientId() {
		return clientId;
	}

	/**
	 * @return the clientType
	 */
	public EnumWebServiceClientType getClientType() {
		return clientType;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the sessionId
	 */
	public String getSessionId() {
		return sessionId;
	}

	/**
	 * @param clientId
	 *            the clientId to set
	 */
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	/**
	 * @param clientType
	 *            the clientType to set
	 */
	public void setClientType(EnumWebServiceClientType clientType) {
		this.clientType = clientType;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @param sessionId
	 *            the sessionId to set
	 */
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}
}
